﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CustomerContactSystem.Core" namespace="CustomerContactSystem.Core.Model">
  <class name="EnquiryFirstReferral" table="EnquiryFirstReferrals">
    <id name="Id">
      <generator class="native"></generator>
    </id>
    <many-to-one name="FirstReferredTo" class="User" column="FirstReferredToId" not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryFirstReferrals_Users"></many-to-one>
    <many-to-one name="FirstReferredToDepartment" class="Department" column="FirstReferredToDepartmentId" not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryFirstReferrals_Departments"></many-to-one>
    <many-to-one name="FirstReferredToGroup" class="UserGroup" column="FirstReferredToGroupId"  not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryFirstReferrals_UserGroups"></many-to-one>
  </class>
</hibernate-mapping>